package test.net.rpc;

import com.wan.AppContext;
import com.wan.net.config.HostAndPort;
import com.wan.net.rpc.RpcManager;
import com.wan.net.rpc.RpcServer;
import com.wan.net.rpc.registry.ZookeeperRegistry;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


/**
 * @author wwh
 * @date 2022/6/23 11:12
 */
public class RpcTestServer {

    private final static Logger logger = LoggerFactory.getLogger(RpcTestServer.class);

    public static void main(String[] args) throws Exception{
        AppContext.testRun();
        RpcManager.setRegistry(new ZookeeperRegistry("127.0.0.1:2181"));
        RpcServer rpcServer = new RpcServer(HostAndPort.ofLocal(9776));
        rpcServer.start();
    }

}
